// app.js
import './utils/request.js'
import './utils/index.js'

App({
  state: {
    //全局的token
    token: wx.getStorageSync('x+token') || ''
  },
  //存储：token=》登录成功后使用
  setToken(token) {
    console.log(1);
    //1.全局存储
    this.state.token = token
    //2.本地持久化
    wx.setStorageSync('x+token', token)
  },

  globalData: {},
})